package com.hh.usersystem.bean.usersystem;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.hh.hibernate.dao.inf.Order;
import com.hh.hibernate.util.base.BaseTwoEntity;

/**
 * HhXtYh entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "HH_XT_YH")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Order
public class HhXtYh extends BaseTwoEntity implements java.io.Serializable {
	@Override
	public String toString() {
		return this.getId();
	}

	private String text;
	private String vdlzh;
	private String vmm;
	private Long nxb;
	private Long nzt;
	private String vdzyj;
	private String vdh;
	private Date dsr;
	private List<HhXtCd> hhXtCdList = new ArrayList<HhXtCd>();// 菜单
	private List<HhXtJs> hhXtJsList = new ArrayList<HhXtJs>();// 角色
	private List<HhXtCd> hhXtYhCdZmtbList = new ArrayList<HhXtCd>();// 桌面快捷方式
	private List<HhXtCz> hhXtCzList = new ArrayList<HhXtCz>();// 用户的操作权限
	private List<String> hhXtCzUrlList = new ArrayList<String>();
	private List<String> jsList = new ArrayList<String>();// 角色ID
	private HHXtZmsx hhXtZmsx;// 用户属性
	private List<Organization> organizationList = new ArrayList<Organization>();// 岗位
	private String orgIdsStr;

	@OneToOne(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER)
	@JoinColumn(name = "ID")
	public HHXtZmsx getHhXtZmsx() {
		return hhXtZmsx;
	}

	public void setHhXtZmsx(HHXtZmsx hhXtZmsx) {
		this.hhXtZmsx = hhXtZmsx;
	}

	@Transient
	public List<String> getJsList() {
		return jsList;
	}

	public void setJsList(List<String> jsList) {
		this.jsList = jsList;
	}

	@Transient
	public List<HhXtCd> getHhXtYhCdZmtbList() {
		return hhXtYhCdZmtbList;
	}

	public void setHhXtYhCdZmtbList(List<HhXtCd> hhXtYhCdZmtbList) {
		this.hhXtYhCdZmtbList = hhXtYhCdZmtbList;
	}

	@Transient
	public List<HhXtCd> getHhXtCdList() {
		return hhXtCdList;
	}

	public void setHhXtCdList(List<HhXtCd> hhXtCdList) {
		this.hhXtCdList = hhXtCdList;
	}

	@Transient
	public List<HhXtCz> getHhXtCzList() {
		return hhXtCzList;
	}

	public void setHhXtCzList(List<HhXtCz> hhXtCzList) {
		this.hhXtCzList = hhXtCzList;
	}

	@Transient
	public List<HhXtJs> getHhXtJsList() {
		return hhXtJsList;
	}

	public void setHhXtJsList(List<HhXtJs> hhXtJsList) {
		this.hhXtJsList = hhXtJsList;
	}

	@Transient
	public List<Organization> getOrganizationList() {
		return organizationList;
	}

	public void setOrganizationList(List<Organization> organizationList) {
		this.organizationList = organizationList;
	}
	
	@Transient
	public List<String> getHhXtCzUrlList() {
		return hhXtCzUrlList;
	}

	public void setHhXtCzUrlList(List<String> hhXtCzUrlList) {
		this.hhXtCzUrlList = hhXtCzUrlList;
	}

	/** default constructor */
	public HhXtYh() {
	}

	@Column(name = "TEXT", length = 64)
	public String getText() {
		return this.text;
	}

	public void setText(String text) {
		this.text = text;
	}

	@Column(name = "VDLZH", length = 32)
	public String getVdlzh() {
		return this.vdlzh;
	}

	public void setVdlzh(String vdlzh) {
		this.vdlzh = vdlzh;
	}

	@Column(name = "VMM", length = 16)
	public String getVmm() {
		return this.vmm;
	}

	public void setVmm(String vmm) {
		this.vmm = vmm;
	}

	@Column(name = "NXB", precision = 1, scale = 0)
	public Long getNxb() {
		return this.nxb;
	}

	public void setNxb(Long nxb) {
		this.nxb = nxb;
	}

	@Column(name = "NZT", precision = 1, scale = 0)
	public Long getNzt() {
		return this.nzt;
	}

	public void setNzt(Long nzt) {
		this.nzt = nzt;
	}

	@Column(name = "VDZYJ", length = 64)
	public String getVdzyj() {
		return this.vdzyj;
	}

	public void setVdzyj(String vdzyj) {
		this.vdzyj = vdzyj;
	}

	@Column(name = "VDH", length = 16)
	public String getVdh() {
		return this.vdh;
	}

	public void setVdh(String vdh) {
		this.vdh = vdh;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "DSR", length = 7)
	public Date getDsr() {
		return this.dsr;
	}

	public void setDsr(Date dsr) {
		this.dsr = dsr;
	}

	@Transient
	public String getOrgIdsStr() {
		return orgIdsStr;
	}

	public void setOrgIdsStr(String orgIdsStr) {
		this.orgIdsStr = orgIdsStr;
	}

}